package com.duan.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.duan.config.UserInfoGenderConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author db
 * @version 1.0
 * @description UserInfo
 * @since 2024/7/2
 */
@Data
@AllArgsConstructor
@NoArgsConstructor

public class UserInfo implements Serializable {
    public static final long serialVersionUID = 767991252105621234L;

    @ExcelProperty(value = "序号")
    private Integer id;

    @ExcelProperty(value = "用户名")
    private String UserName;

    @ExcelProperty(value = "密码")
    private String password;

    @ExcelProperty(value = "性别",converter = UserInfoGenderConverter.class)
    private Integer gender;

    @ExcelProperty(value = "邮箱")
    private String email;

    @ExcelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ExcelIgnore
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
